package crawler;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author Anthony Dare
 */
public class PageQnA {

    private String url;
    private String title;
    private List<String> question;
    private List<Integer> answer;

    public PageQnA(String url, String title) {
        this.url = url;
        this.title = title;
        question = new LinkedList();
        answer = new LinkedList();
    }

    public void addQnA(List<String> q, List<Integer> a) {
        if (q.size() == a.size()) {
            question.addAll(q);
            answer.addAll(a);
        }
    }
    
    public void addQnA(String q, int a) {
    	question.add(q);
    	answer.add(a);
    }

    public String getUrl() {
        return url;
    }

    public String getTitle() {
        return title;
    }

    public List<String> getQuestions(){
        return question;
    }
    
    public List<Integer> getAnswers(){
        return answer;
    }
    
    public boolean isQnAEmpty(){
        return question.isEmpty() || answer.isEmpty();
    }
}
